/**
 * File   : ThreadException.h
 * Time   : 2014-12-15 10:34
 * Author : KashingLee
 * Ref    : mooon
 */
#ifndef PLCC_THREAD_THREADEXCEPTION_H_
#define PLCC_THREAD_THREADEXCEPTION_H_
#include <iostream>
#include <stdint.h>

#define THREAD_ATTR_INIT        1
#define THREAD_BEFORE_RUN       2
#define THREAD_CREATE           3
#define THREAD_JOIN             4
#define THREAD_DETACH           5
#define THREAD_GET_ATTR         6
#define THREAD_MUTEX_INIT       7
#define THREAD_LOCK             8
#define THREAD_UNLOCK           9
#define THREAD_TRY_LOCK         10
#define THREAD_EVENT_INIT       11
#define THREAD_EVENT_WAIT       12
#define THREAD_EVENT_TIMEDWAIT  13
#define THREAD_EVENT_SIGNAL     14
#define THREAD_EVENT_BROADCAST  15

class ThreadException {
 public:
  ThreadException(uint32_t errno):errno_(errno){}
  //~ThreadException();
  //uint32_t errno() const { return errno_; }
  void     ShowError() const;
 private:
  ThreadException() {}
  uint32_t errno_;
};
#endif //PLCC_THREAD_THREADEXCEPTION_H_
